.class Lrexsee/core/browser/RexseePrompt$24;
.super Ljava/lang/Object;
.source "RexseePrompt.java"

# interfaces
.implements Landroid/view/View$OnCreateContextMenuListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseePrompt;->showCountryOrCity(Lrexsee/core/browser/clazz/PromptArgumentsSheet;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseePrompt;

.field private final synthetic val$array:[[Ljava/lang/String;

.field private final synthetic val$cityText:Landroid/widget/TextView;

.field private final synthetic val$provinceText:Landroid/widget/TextView;

.field private final synthetic val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseePrompt;Landroid/widget/TextView;[[Ljava/lang/String;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;Landroid/widget/TextView;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseePrompt$24;->this$0:Lrexsee/core/browser/RexseePrompt;

    iput-object p2, p0, Lrexsee/core/browser/RexseePrompt$24;->val$provinceText:Landroid/widget/TextView;

    iput-object p3, p0, Lrexsee/core/browser/RexseePrompt$24;->val$array:[[Ljava/lang/String;

    iput-object p4, p0, Lrexsee/core/browser/RexseePrompt$24;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    iput-object p5, p0, Lrexsee/core/browser/RexseePrompt$24;->val$cityText:Landroid/widget/TextView;

    .line 388
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onCreateContextMenu(Landroid/view/ContextMenu;Landroid/view/View;Landroid/view/ContextMenu$ContextMenuInfo;)V
    .locals 7
    .param p1, "menu"    # Landroid/view/ContextMenu;
    .param p2, "v"    # Landroid/view/View;
    .param p3, "menuInfo"    # Landroid/view/ContextMenu$ContextMenuInfo;

    .prologue
    .line 391
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$24;->val$provinceText:Landroid/widget/TextView;

    invoke-virtual {v4}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v4

    invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v3

    .line 392
    .local v3, "province":Ljava/lang/String;
    const/4 v0, 0x0

    check-cast v0, [Ljava/lang/String;

    .line 393
    .local v0, "cities":[Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_0
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$24;->val$array:[[Ljava/lang/String;

    array-length v4, v4

    if-lt v1, v4, :cond_1

    .line 399
    :goto_1
    if-nez v0, :cond_3

    .line 400
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$24;->this$0:Lrexsee/core/browser/RexseePrompt;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Cities for "

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "not found."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    iget-object v6, p0, Lrexsee/core/browser/RexseePrompt$24;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    # invokes: Lrexsee/core/browser/RexseePrompt;->error(Ljava/lang/String;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
    invoke-static {v4, v5, v6}, Lrexsee/core/browser/RexseePrompt;->access$11(Lrexsee/core/browser/RexseePrompt;Ljava/lang/String;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V

    .line 413
    :cond_0
    invoke-interface {p1, v3}, Landroid/view/ContextMenu;->setHeaderTitle(Ljava/lang/CharSequence;)Landroid/view/ContextMenu;

    .line 414
    return-void

    .line 394
    :cond_1
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$24;->val$array:[[Ljava/lang/String;

    aget-object v4, v4, v1

    const/4 v5, 0x0

    aget-object v4, v4, v5

    invoke-virtual {v4, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 395
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$24;->val$array:[[Ljava/lang/String;

    aget-object v0, v4, v1

    .line 396
    goto :goto_1

    .line 393
    :cond_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 402
    :cond_3
    const/4 v1, 0x1

    :goto_2
    array-length v4, v0

    if-ge v1, v4, :cond_0

    .line 403
    aget-object v4, v0, v1

    invoke-interface {p1, v4}, Landroid/view/ContextMenu;->add(Ljava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v2

    .line 404
    .local v2, "item":Landroid/view/MenuItem;
    new-instance v4, Lrexsee/core/browser/RexseePrompt$24$1;

    iget-object v5, p0, Lrexsee/core/browser/RexseePrompt$24;->val$cityText:Landroid/widget/TextView;

    invoke-direct {v4, p0, v5}, Lrexsee/core/browser/RexseePrompt$24$1;-><init>(Lrexsee/core/browser/RexseePrompt$24;Landroid/widget/TextView;)V

    invoke-interface {v2, v4}, Landroid/view/MenuItem;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Landroid/view/MenuItem;

    .line 402
    add-int/lit8 v1, v1, 0x1

    goto :goto_2
.end method
